//
//  Members.m
//  Doctor1.0
//
//  Created by mk on 15/7/10.
//  Copyright (c) 2015年 cocoa-mk. All rights reserved.
//

#import "Members.h"

@implementation MembersInfo

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
        self.strDataKey = requestDataKey;
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSDictionary class]])
    {
        self.men_id = NullObjToString(dataObj[@"id"]);//
        self.mem_name = NullObjToString(dataObj[@"name"]);//
        self.mem_mTitle = NullObjToString(dataObj[@"mTitle"]);//
        self.mem_aTitle = NullObjToString(dataObj[@"aTitle"]);//
        self.mem_imageUrl = NullObjToString(dataObj[@"imageUrl"]);
        self.mem_desc = NullObjToString(dataObj[@"desc"]);//
        self.mem_hpID = NullObjToString(dataObj[@"hpId"]);//
        self.mem_hpName = NullObjToString(dataObj[@"hpName"]);//
        self.mem_hpDeptId = NullObjToString(dataObj[@"hpDeptId"]);
        self.mem_hpDeptName = NullObjToString(dataObj[@"hpDeptName"]);//
        self.mem_hFaculty = NullObjToString(dataObj[@"hFaculty"]);//
        self.mem_actionUrl = NullObjToString(dataObj[@"actionUrl"]);//
       
    }
}


@end


@implementation MembersList

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
        self.strDataKey = requestDataKey;
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSArray class]])
    {
        for (int i = 0; i < [dataObj count]; i++) {
            NSDictionary *dicRec = [dataObj objectAtIndex:i];
            MembersInfo *recData = [[MembersInfo alloc] init];
            [recData parseData:dicRec];
            [self.dataArray addObject:recData];
        }
    }
}

@end


